#include <stdio.h>
#include <pthread.h>
#include <unistd.h>

void *my_thread_start(void *arg){
  int count=10;
  while(count--){
    printf("i am my_thread_start,%d\n",count);
    sleep(1);
  }
}

int main(){
  pthread_t tid;
  int ret=pthread_create(&tid,NULL,my_thread_start,NULL);
  if(ret<0){
    perror("pthread_create");
    return 0;
  }

  pthread_join(tid,NULL);// 阻塞等待

  printf("pthread_join success\n");
  return 0;
}
